package cn.wen233.core.service.impl;

import cn.wen233.basic.model.ServiceRecord;
import cn.wen233.core.mapper.ServiceRecordMapper;
import cn.wen233.core.service.ServiceRecordService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author wenjie
 * @date 2022-05-07 14:41
 */
@Service
@RequiredArgsConstructor
public class PersistenceServiceRecordServiceImpl implements ServiceRecordService {

    private final ServiceRecordMapper serviceRecordMapper;

    @Override
    public void create(ServiceRecord serviceRecord) {
        serviceRecord.setVisitTime(System.currentTimeMillis());
        serviceRecordMapper.insertServiceRecord(serviceRecord);
    }
}
